range: Properly queue draws when doing a drag
authorBenjamin Otte <otte@redhat.com>
Sat, 29 Nov 2014 02:23:58 +0000 (03:23 +0100)
committerBenjamin Otte <otte@redhat.com>
Sat, 29 Nov 2014 02:42:29 +0000 (03:42 +0100)
The dragged area needs to be marked as :active during the drag.

gtk/gtkrange.c

index 5a9fe0f4da053387c89a62f92ff25cbecca6483b..dee93e0d898e20a7946246ee935320cbe4f313a2 100644 (file)
@@ -2247,6 +2247,7 @@ range_grab_add (GtkRange      *range,
    * is the only widget receiving the pointer events.
    */
   priv->grab_location = location;
+  gtk_range_queue_draw_location (range, location);
 
   gtk_style_context_add_class (context, "dragging");
 }
@@ -2272,16 +2273,14 @@ static void
 range_grab_remove (GtkRange *range)
 {
   GtkRangePrivate *priv = range->priv;
-  MouseLocation location;
   GtkStyleContext *context;
 
   context = gtk_widget_get_style_context (GTK_WIDGET (range));
 
-  location = priv->grab_location;
+  gtk_range_queue_draw_location (range, priv->grab_location);
   priv->grab_location = MOUSE_OUTSIDE;
 
-  if (gtk_range_update_mouse_location (range) ||
-      location != MOUSE_OUTSIDE)
+  if (gtk_range_update_mouse_location (range))
     gtk_widget_queue_draw (GTK_WIDGET (range));
 
   update_zoom_state (range, FALSE);